# Create your views here.
from django.shortcuts import render_to_response
from taggle.models import Tag
from post.models import Post

def all_tags(request):
    tags = Tag.objects.all()
    return render_to_response("tag/all_tags.html", locals())

def single(request, name):
    tag = Tag.objects.get(name = name)
    posts = tag.post.all()
    return render_to_response("tag/single_tag.html", locals())